import datetime
from time import localtime, mktime


def convert_ts_2_date(timestamp):
    structure_time = localtime(int(timestamp))
    dt = datetime.datetime.fromtimestamp(mktime(structure_time))
    return dt
